package cn.edu.xmu.oomall.aftersales.microservice;

import cn.edu.xmu.oomall.aftersales.microservice.vo.ProductRetVo;
import cn.edu.xmu.privilegegateway.annotation.aop.LoginName;
import cn.edu.xmu.privilegegateway.annotation.aop.LoginUser;
import cn.edu.xmu.privilegegateway.annotation.util.InternalReturnObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name="goods-service")
public interface GoodsService {

    @GetMapping("/shops/{shopId}/products/{id}")
    InternalReturnObject<ProductRetVo> getShopProductDetails(@PathVariable Long shopId,
                                                             @PathVariable Long id,
                                                             @RequestParam @LoginUser Long userId,
                                                             @RequestParam @LoginName String userName);

}
